package org.sample.springboot.validator.constraints.optional.provider;

import static java.lang.annotation.ElementType.FIELD;
import static java.lang.annotation.ElementType.TYPE;
import static java.lang.annotation.RetentionPolicy.RUNTIME;

import java.lang.annotation.Documented;
import java.lang.annotation.Repeatable;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;

import javax.validation.Constraint;
import javax.validation.Payload;

import org.sample.springboot.validator.ProviderOptionalValidator;

@Target({ TYPE, FIELD })
@Retention(RUNTIME)
@Constraint(validatedBy = ProviderOptionalValidator.class)
@Repeatable(ProviderOptionalConstraints.class)
@Documented
public @interface ProviderOptionalConstraint {

	Class<? extends OptionalProvider> provider();

	String message() default "";

	Class<?>[] groups() default {};

	Class<? extends Payload>[] payload() default {};

}
